/*
 * @Author: Jiagang Chen
 * @Date: 2021-11-11 13:52:35
 * @LastEditors: Jiagang Chen
 * @LastEditTime: 2021-12-13 11:25:53
 * @Description: ...
 * @Reference: ...
 */

#ifndef SRC_CONVERTER_H
#define SRC_CONVERTER_H

#include <limits.h>
#include <memory>
#include <string>

#include <ros/ros.h>
#include <rosbag/bag.h>

#include <boost/filesystem.hpp>

#include <irp_sen_msgs/LaserScanArray.h>
#include <irp_sen_msgs/altimeter.h>
#include <irp_sen_msgs/encoder.h>
#include <irp_sen_msgs/fog_3axis.h>
#include <irp_sen_msgs/imu.h>
#include <irp_sen_msgs/vrs.h>
#include <sensor_msgs/Image.h>
#include <sensor_msgs/Imu.h>
#include <sensor_msgs/LaserScan.h>
#include <sensor_msgs/MagneticField.h>
#include <sensor_msgs/NavSatFix.h>
#include <sensor_msgs/PointCloud2.h>

#include <cv_bridge/cv_bridge.h>
#include <opencv2/core/core.hpp>
#include <opencv2/highgui.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/opencv.hpp>

namespace kaist_publisher {

std::string FilterSlash(const std::string& input);

class Converter {
public:
    Converter(const std::string& dataset_dir, const std::string& save_dir);
    virtual ~Converter() = default;

    virtual int Convert();
    virtual bool DirValid();

protected:
    void CheckAndCreateSaveDir();

protected:
    std::string dataset_dir_;
    std::string save_dir_;
    bool dir_valid_;
};

}  // namespace kaist_publisher

#endif  // SRC_CONVERTER_H
